
#ifndef __SYSLOG_PARAMS_H__
#define __SYSLOG_PARAMS_H__


struct syslog_params_t
{
	bool init( int argc, TCHAR** argv );
	void dump( );

	struct
	{
		int argc;
		TCHAR** argv;
	}
	cmd_line;

	static const TCHAR regpath_default[ ];
	TCHAR regpath[ SYSLOG_MAX_PATH ];
	bool regpath_set;
	bool no_reg;

	bool no_dump;
	bool no_run;

	bool have_console;
	bool using_stdout;
	bool running_as_a_service;

	static const TCHAR logpath_default[ ];
	TCHAR logpath[ SYSLOG_MAX_PATH ];
	bool logpath_set;

	static const TCHAR logname_default[ ];
	TCHAR logname[ SYSLOG_MAX_PATH ];
	bool logname_set;

	static const TCHAR logextension_default[ ];
	TCHAR logextension[ SYSLOG_MAX_PATH ];
	bool logextension_set;

	date_time_compare logrotate_condition;
	bool logrotate_condition_set;

	static const byte replacement_default;
	byte replacement;
	byte replacement_set;

	static const byte filter_default;
	byte filter;
	bool filter_set;

	static const byte own_filter_default;
	byte own_filter;
	bool own_filter_set;

	bool log_date;
	bool log_date_set;

	bool log_time;
	bool log_time_set;

	bool log_msec;
	bool log_msec_set;

	bool log_ip;
	bool log_ip_set;

	bool newline_with_CR;
	bool newline_with_CR_set;

	bool mark_as_readonly;
	bool mark_as_readonly_set;

	bool flush;
	bool flush_set;

	static const size_t max_regex = 12;
	struct regex_mode
	{
		syslog_regex_t regex;
		enum { drop, trim, pass } mode;
	} regex_tests[ max_regex ];
	size_t num_regex;

	static /* const */ IN_ADDR address_any;
	static /* const */ IN_ADDR address_loopback;
	IN_ADDR address;
	bool address_set;

	u_short port;
	bool port_set;
};


#endif // __SYSLOG_PARAMS_H__
